package src.accenture.com.entity;

import java.io.Serializable;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@NamedQueries( { @NamedQuery(name = "MblDepartment.findAll", query = "select o from MblDepartment o") })
@Table(name = "MBL_DEPARTMENT")
public class MblDepartment implements Serializable {
    @Column(name = "DEP_DESCRIBE", length = 4000)
    private String depDescribe;
    @Id
    @Column(name = "DEP_ID", nullable = false, length = 10)
    private String depId;
    @Column(name = "DEP_NAME", length = 4000)
    private String depName;
    @OneToMany(mappedBy = "mblDepartment")
    private List<MblEmployee> mblEmployeeList;

    public MblDepartment() {
    }

    public MblDepartment(String depDescribe, String depId, String depName) {
        this.depDescribe = depDescribe;
        this.depId = depId;
        this.depName = depName;
    }

    public String getDepDescribe() {
        return depDescribe;
    }

    public void setDepDescribe(String depDescribe) {
        this.depDescribe = depDescribe;
    }

    public String getDepId() {
        return depId;
    }

    public void setDepId(String depId) {
        this.depId = depId;
    }

    public String getDepName() {
        return depName;
    }

    public void setDepName(String depName) {
        this.depName = depName;
    }

    public List<MblEmployee> getMblEmployeeList() {
        return mblEmployeeList;
    }

    public void setMblEmployeeList(List<MblEmployee> mblEmployeeList) {
        this.mblEmployeeList = mblEmployeeList;
    }

    public MblEmployee addMblEmployee(MblEmployee mblEmployee) {
        getMblEmployeeList().add(mblEmployee);
        mblEmployee.setMblDepartment(this);
        return mblEmployee;
    }

    public MblEmployee removeMblEmployee(MblEmployee mblEmployee) {
        getMblEmployeeList().remove(mblEmployee);
        mblEmployee.setMblDepartment(null);
        return mblEmployee;
    }
}
